<?php defined('InShopNC') or exit('Access Invalid!');?>

<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <h3>加盟商管理</h3>
      <ul class="tab-base">
        <li><a href="JavaScript:void(0);" class="current"><span><?php echo $lang['nc_manage'];?></span></a></li>
        <li><a href="index.php?act=franchise&op=add" ><span><?php echo $lang['nc_new'];?></span></a></li>
      </ul>
    </div>
  </div>
  <div class="fixed-empty"></div>
  <form method="get" name="formSearch">
    <input type="hidden" value="franchise" name="act">
    <input type="hidden" value="index" name="op">
    <table class="tb-type1 noborder search">
      <tbody>
        <tr>
          <th><label for="search_title"><?php echo $lang['article_index_title'];?></label></th>
          <td><input type="text" value="<?php echo $output['search_title'];?>" name="search_title" id="search_title" class="txt"></td>
          <th><label for="search_ac_id"><?php echo $lang['article_index_class'];?></label></th>
          <td><a href="javascript:document.formSearch.submit();" class="btn-search " title="<?php echo $lang['nc_query'];?>">&nbsp;</a>
          </td>
        </tr>
      </tbody>
    </table>
  </form>
  <form method="post" action="index.php?act=franchise&op=del" id="form_article">
    <input type="hidden" name="form_submit" value="ok" />
    <table class="table tb-type2">
      <thead>
        <tr class="thead">
          <th class="w24"></th>
          <th class="align-center">加盟商名称</th>
          <th class="align-center">加盟商地址</th>
          <th class="align-center">联系人</th>
          <th class="align-center">联系人电话</th>
          <th class="align-center">添加时间</th>
          <th class="align-center">编辑</th>
        </tr>
      </thead>
      <tbody>
        <?php if(!empty($output['list']) && is_array($output['list'])){ ?>
        <?php foreach($output['list'] as $k => $v){ ?>
        <tr class="hover">
          <td><input type="checkbox" name='del_id[]' value="<?php echo $v['franchisee_id']; ?>" class="checkitem"></td>
          <td class="align-center"><?php echo $v['franchisee_name']; ?></td>
          <td class="align-center"><?php echo $v['franchisee_address']; ?></td>
          <td class="align-center"><?php echo $v['linkname']; ?></td>
          <td class="align-center"><?php echo $v['linkname_mobile']; ?></td>
          <td class="nowrap align-center"><?php echo $v['addtime'];?></td>
          <td class="align-center">
            <a href="index.php?act=franchise&op=edit&id=<?php echo $v['franchisee_id']; ?>">加盟信息</a>
            <a href="index.php?act=article&op=article_edit&article_id=<?php echo $v['article_id']; ?>">文章介绍</a>
          </td>
        </tr>
        <?php } ?>
        <?php }else { ?>
        <tr class="no_data">
          <td colspan="7"><?php echo $lang['nc_no_record'];?></td>
        </tr>
        <?php } ?>
      </tbody>
      <tfoot>
        <?php if(!empty($output['list']) && is_array($output['list'])){ ?>
        <tr class="tfoot">
          <td><input type="checkbox" class="checkall" id="checkallBottom"></td>
          <td colspan="16"><label for="checkallBottom"><?php echo $lang['nc_select_all']; ?></label>
            &nbsp;&nbsp;<a href="JavaScript:void(0);" class="btn" onclick="if(confirm('<?php echo $lang['nc_ensure_del'];?>')){$('#form_article').submit();}"><span><?php echo $lang['nc_del'];?></span></a>
            <div class="pagination"> <?php echo $output['page'];?> </div></td>
        </tr>
        <?php } ?>
      </tfoot>
    </table>
  </form>
</div>
